/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package it.txt.access.capability.verifier.osgi;

import java.util.logging.Level;
import java.util.logging.Logger;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
/**
 *
 * @author seccia
 */
public class CapabilityVerifierActivator implements BundleActivator {

    private static final Logger LOGGER = Logger.getLogger(CapabilityVerifierActivator.class.getName());
    private static ClassLoader contextClassLoader;

    public void start(BundleContext context) throws Exception {
        long id = context.getBundle().getBundleId();
        LOGGER.log(Level.INFO, "[TXTAccess :: Capability :: "
                + "Schema :: Verifier]: Bundle ID: {0}", id);
        setContextClassLoader(CapabilityVerifierActivator.class.getClassLoader());
    }

    public void stop(BundleContext context) throws Exception {}

    public static ClassLoader getContextClassLoader() {
        return contextClassLoader;
    }

    public static void setContextClassLoader(ClassLoader contextClassLoader) {
        CapabilityVerifierActivator.contextClassLoader = contextClassLoader;
    }
}
